package cn.com.dcsgo.controller;

import cn.com.dcsgo.domain.Member;
import cn.com.dcsgo.dto.MemberInfoDTO;
import cn.com.dcsgo.service.MemberService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

/**
 * 会员RPC相关接口
 *
 * @author Dcsgo
 * @since 2025/11/6 12:33
 */
@Tag(name = "会员RPC相关接口")
@RestController
@RequestMapping("rpc/member")
public class MemberRPCController {
    @Resource
    private MemberService memberService;

    @GetMapping("nick-name-and-pic")
    @Operation(summary = "获取会员昵称和头像")
    public List<MemberInfoDTO> findMemberNickNameAndPicByOpenIds(@RequestParam("openid") Set<String> openIds) {
        return memberService.findMemberNickNameAndPicByOpenIds(openIds);
    }
}
